Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust Makefile to work with macOS #6

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Conversation

dljsjr
Copy link
Contributor

@dljsjr dljsjr commented Dec 24, 2024

This PR makes two small tweaks to the Makefile for a slightly smoother experience on macOS:

  • macOS ships with GNU make, not BSD make, but it doesn't ship any GPLv3 GNU tools. That means that it's stuck on GNU Make 3.81. While ::= and := are defined as equivalent in the GNU Make manual, GNU Make 3.81 only supports the form :=. This saves users from having to install gmake from homebrew.
  • macOS uses BSD install, and BSD install uses positional args of the form file1 ... fileN directory instead of the -t|--target flag to specificy directory. The fix here is introducing a conditional.

@tim-janik
Copy link
Owner

* macOS uses BSD `install`, and BSD `install` uses positional args of the form `file1 ... fileN directory` instead of the `-t|--target` flag to specificy `directory`. The fix here is introducing a conditional.

Thanks for the PR!
Do you have a link to the man page for install on macOS? I'd rather find a syntax that works for both systems.

@tim-janik
Copy link
Owner

Please read through https://developercertificate.org/ and add a Signed-off-by line to your commit message.

This should probably be added to the README under some Contributions header or similar...

@dljsjr
Copy link
Contributor Author

dljsjr commented Dec 30, 2024

* macOS uses BSD `install`, and BSD `install` uses positional args of the form `file1 ... fileN directory` instead of the `-t|--target` flag to specificy `directory`. The fix here is introducing a conditional.

Thanks for the PR! Do you have a link to the man page for install on macOS? I'd rather find a syntax that works for both systems.

This seems to line up with the actual output of man install on macOS: https://ss64.com/mac/install.html

Looking at the Linux man page for install, it looks like it has a similar form where it takes a list of sources and a final destination directory as positional arguments: https://man7.org/linux/man-pages/man1/install.1.html (I'm looking at the 2nd POSIX-y form).

Additionally, from both man pages, it looks like -c is ignored/the default behavior, so the invocation could likely just be install jj-fzf "$(bindir)"

@dljsjr
Copy link
Contributor Author

dljsjr commented Dec 31, 2024

I just force-pushed an amended commit with the "unified" install invocation, it works under both my macOS and Ubuntu dev environments.

Copy link
Owner

@tim-janik tim-janik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good now.

@tim-janik tim-janik merged commit 6e2de4c into tim-janik:trunk Jan 9, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants